package org.mat.ipaas.ucenter.biz.modules.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.mat.ipaas.ucenter.biz.modules.system.entity.SysAnnouncementSend;
import org.mat.ipaas.ucenter.biz.modules.system.model.AnnouncementSendModel;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * 用户通告阅读标记表
 */
public interface SysAnnouncementSendMapper extends BaseMapper<SysAnnouncementSend> {

    /**
     * 通过用户id查询 用户通告阅读标记表
     *
     * @param userId 用户id
     * @return
     */
    public List<String> queryByUserId(@Param("userId") String userId);

    /**
     * 获取我的消息
     *
     * @param announcementSendModel
     * @param page
     * @return
     */
    public List<AnnouncementSendModel> getMyAnnouncementSendList(Page<AnnouncementSendModel> page, @Param("announcementSendModel") AnnouncementSendModel announcementSendModel);

    /**
     * 获取一条记录
     *
     * @param sendId
     * @return
     */
    AnnouncementSendModel getOne(@Param("sendId") String sendId);


    /**
     * 修改为已读消息
     */
    void updateReaded(@Param("userId") String userId, @Param("annoceIdList") List<String> annoceIdList);
}
